// HelpDesk Java Swing Application using MySQL
// University of Cincinnati - Software Engineering EECE 495
// Andrew Yingling, Joseph Shelton, Alex Stephens, Rob Riemens

package helpdesk;

import java.sql.*;
import java.io.*;

public class HelpDesk {

    static final String FTP_SERVER_ADDRESS = "ftp.drivehq.com";
    static final String FTP_USERNAME = "uchelpdsk";
    static final String FTP_PASSWORD = "eece495";
    static final int FTP_PORT = 21;
    static String FTP_ROOT;

    static Connection connection = null;
    static String accountName= "";
    // initialize to a number that carries no AccountType just for safety
    static int accountType= 3;
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        FTP_ROOT = "ftp://"+FTP_USERNAME+":"+FTP_PASSWORD+"@"+FTP_SERVER_ADDRESS;
        // open connection to mysql db
        //Connection connection = null;
        try
        {
            String userName = "hlpdsk";
            String password = "ucmysqlcincy";
            String url = "jdbc:mysql://www.freesql.org:3306/helpdesk";
            Class.forName ("com.mysql.jdbc.Driver").newInstance ();
            connection = DriverManager.getConnection (url, userName, password);
        }
        catch (Exception e)
        {
            System.err.println ("Database not available.");
        }
        
        
        LoginForm myLoginForm = new LoginForm();
        myLoginForm.setVisible(true);
        
        // close connection to mysql db
        //try
        //{
        //    connection.close ();
        //    System.out.println ("Connection terminated.");
        //}
        //catch (Exception e) { /* ignore close errors */ }
    }
}
